package vn.vfriends.soffice.service.impl;

import java.util.List;
import javax.inject.Inject;
import vn.vfriends.soffice.entity.Menu;
import vn.vfriends.soffice.entity.Permission;
import vn.vfriends.soffice.facade.PermissionFacade;
import vn.vfriends.soffice.service.PermissionService;

/**
 *
 * @author chaungoctuan@gmail.com
 */
public class PermissionServiceImpl implements PermissionService {

    @Inject private PermissionFacade permissionFacade;
    
    @Override
    public void create(Permission permission) throws Exception {
        permissionFacade.create(permission);
    }

    @Override
    public void edit(Permission permission) throws Exception {
        permissionFacade.edit(permission);
    }

    @Override
    public void remove(Permission permission) throws Exception {
        permissionFacade.remove(permission);
    }

    @Override
    public Permission find(Object id) {
        return permissionFacade.find(id);
    }

    @Override
    public List<Permission> findAll() {
        return permissionFacade.findAll();
    }

    @Override
    public List<Permission> findRange(int[] range) {
        return permissionFacade.findRange(range);
    }

    @Override
    public int count() {
        return permissionFacade.count();
    }

    @Override
    public List<Permission> findPermissionsByMenu(Menu menu) {
        return permissionFacade.findPermissionsByMenu(menu);
    }

}
